package com.tsunami.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tsunami.authority.entity.auth.Menu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 菜单表 Mapper 接口
 * </p>
 *
 * @author lx
 * @since 2021-09-23
 */
public interface MenuMapper extends BaseMapper<Menu> {

    Page<Menu> selectPageList(@Param("page") Page<Menu> page, @Param("data") Menu data);

    /**
     * 查询用户可用菜单
     * @param group
     * @param userId
     * @return
     */
    List<Menu> findVisibleMenu(@Param("group") String group, @Param("userId") Long userId, @Param("code") String code);
}
